import java.io.*;

public class JSInputOutput implements IJSInputOutput {

	BufferedReader userInput;
	public JSInputOutput()
	{
		userInput = new BufferedReader(new InputStreamReader(System.in));
	}
	
	
	@Override
	public String userPrompt(String workDir) {
		
		String promtFormat = String.format("%s# ", workDir); //Build user prompt based on the current working directory
		System.out.print(promtFormat);
		String rtn_value = "";
		try 
		{
			rtn_value = userInput.readLine(); //and read in user input
		} 
		catch (IOException e) 
		{
			e.printStackTrace();
		}
		
		return rtn_value;
		
		
	}

	@Override
	public void print(String printMe) {
		
		//print output to console
		System.out.println(printMe);
		
	}

}
